package com.longge;

public class ReverseListNode {



    public ListNode reserve(ListNode head) {
        if (head == null || head.next == null) return head;

        ListNode last = reserve(head.next);
        head.next.next = head;
        head.next = null;

        return last;

    }
}
